<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>首页</title>
    <link rel="stylesheet" href="/static/index/css/index.css">
</head>
<body>
<img src="/static/index/images/index-background.png" class="background"/>
<div class="box">
    <img src="/static/index/images/index-logo.png" class="logo">
    <div class="icon1">R</div>

    <div class="href">
        <div class="row" onclick="window.location.href='/index/index/carDetail'">
            <img src="/static/index/images/search.png" class="img">
            <img src="/static/index/images/next.png" class="next">
        </div>
        <div class="row goAdd">
            <img src="/static/index/images/insert.png" class="img">
            <img src="/static/index/images/next.png" class="next">
        </div>
    </div>

    <div class="footer">
        <div class="top-box">
            <img src="/static/index/images/footer-icon1.png">
            <img src="/static/index/images/footer-icon2.png">
        </div>
        <img src="/static/index/images/footer-icon3.png" class="icon3">
    </div>
</div>

</body>
<script src="/static/jquery/jquery-3.1.1.min.js"></script>
<script src="__STATIC__/layer/layer.js"></script>

<script>
    var user_id = `{$user_id}` ? `{$user_id}` : 0;
    var shop_id = `{$shop_id}` ? `{$shop_id}` : 0;
    $('.goAdd').click(() => {
        if (!(user_id && shop_id)) {
            window.location.href = '/index/index/login';
        } else {
            window.location.href = '/index/index/addCar';
        }
    })
</script>
</html>
